//
//  UIButton+FDExtension.m
//  FamousDoctorOnline
//
//  Created by Cain on 16/7/9.
//  Copyright © 2016年 wszyxc. All rights reserved.
//

#import "UIButton+FDExtension.h"

@implementation UIButton (FDExtension)

+ (instancetype)setCustomButtonWithImage:(NSString *)imageName andTitle:(NSString *)title
{
    UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
    [button setImage:[UIImage imageNamed:imageName] forState:UIControlStateNormal];
    [button setTitle:title forState:UIControlStateNormal];
    [button setTitleColor:[UIColor colorWithRed:80/255.0 green:200/255.0 blue:210/255.0 alpha:1] forState:UIControlStateNormal];
    button.titleLabel.font = [UIFont systemFontOfSize:SCREEN_WIDTH*0.04];
    return button;
}

+ (instancetype)setupOneButtonWithTitle:(NSString *)title {
    
    UIButton *button = [[UIButton alloc]init];
    
    [button setTitleColor:kThemeColor forState:UIControlStateNormal];
    
    [button setTitle:title forState:UIControlStateNormal];
    
    button.titleLabel.numberOfLines = 0;
    
    button.titleLabel.font = [UIFont systemFontOfSize:SCREEN_WIDTH*0.04];
//    NSMutableDictionary *mDict = [NSMutableDictionary dictionary];
    
//    mDict[NSUnderlineStyleAttributeName] = @1;
//    mDict[NSForegroundColorAttributeName] = kThemeColor;
    
    return button;
    
}

@end
